
<!DOCTYPE html>
<!--

    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<!-- Portions Copyright [2019] [Payara Foundation and/or its affiliates] -->
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>generate-jvm-report</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/style.css" rel="stylesheet">
    <script src="https://use.fontawesome.com/96c4d89611.js"></script>
  </head>
  <body>
<table id="doc-title" cellspacing="0" cellpadding="0">
  <tr>
  <td align="left" valign="top">
  <b>generate-jvm-report</b><br />
  </td>
  </tr>
</table>
<hr />

<table width="90%" id="top-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>
		<td align="left">
		<a href="freeze-transaction-service.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="get.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class=" vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>


<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p>The script content on this page is for navigation purposes only and does
not alter the content in any way.</p>
</div>
<div class="paragraph">
<p><a id="generate-jvm-report-1"></a><a id="GSRFM00138"></a><a id="generate-jvm-report"></a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_generate_jvm_report">generate-jvm-report</h2>
<div class="sectionbody">
<div class="paragraph">
<p>shows the JVM machine statistics for a given target instance</p>
</div>
<div id="sthref1200" class="paragraph">
<p>Synopsis</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">generate-jvm-report [--help] [--type=jvm-statistic-type] [--target target]</code></pre>
</div>
</div>
<div id="sthref1201" class="paragraph">
<p>Description</p>
</div>
<div class="paragraph">
<p>The <code>generate-jvm-report</code> subcommand creates a report that shows the
threads (dump of stack trace), classes, memory, or loggers for a given
target instance, including the domain administration server (DAS). If a
type is not specified, a summary report is generated. This subcommand
only provides statistics for the \{product---name} instance processes.
This subcommand provides an alternative to sending Ctrl+Break or
<code>kill -3</code> signals to \{product---name} processes to obtain a stack trace
for processes that are hanging.</p>
</div>
<div class="paragraph">
<p>The information in the report is obtained from managed beans (MBeans)
and MXBeans that are provided in the Java Platform, Standard Edition
(Java SE ) or JDK software with which \{product---name} is being used.</p>
</div>
<div class="paragraph">
<p>If \{product---name} is running in the Java Runtime Environment (JRE)
software from JDK release 6 or Java SE 6, additional information is
provided. For example:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>System load on the available processors</p>
</li>
<li>
<p>Object monitors that are currently held or requested by a thread</p>
</li>
<li>
<p>Lock objects that a thread is holding, for example, <code>ReentrantLock</code>
objects and <code>ReentrantReadWriteLock</code> objects</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>If the JRE software cannot provide this information, the report contains
the text <code>NOT_AVAILABLE</code>.</p>
</div>
<div class="paragraph">
<p>This subcommand is supported in remote mode only.</p>
</div>
<div id="sthref1202" class="paragraph">
<p>Options</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">asadmin-options</dt>
<dd>
<p>Options for the <code>asadmin</code> utility. For information about these
options, see the <a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a> help page.</p>
</dd>
<dt class="hdlist1"><code>--help</code></dt>
<dt class="hdlist1"><code>-?</code></dt>
<dd>
<p>Displays the help text for the subcommand.</p>
</dd>
<dt class="hdlist1"><code>--target</code></dt>
<dd>
<p>Specifies the target for which you are showing JVM machine statistics.<br>
Valid values are as follows:<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>server</code></dt>
<dd>
<p>Specifies the DAS (default).</p>
</dd>
<dt class="hdlist1">instance-name</dt>
<dd>
<p>Specifies a \{product---name} instance.</p>
</dd>
<dt class="hdlist1">cluster-name</dt>
<dd>
<p>Specifies a cluster.</p>
</dd>
<dt class="hdlist1">configuration-name</dt>
<dd>
<p>Specifies a named configuration.</p>
</dd>
</dl>
</div>
</dd>
<dt class="hdlist1"><code>--type</code></dt>
<dd>
<p>The type of report that is to be generated. Default is <code>summary</code>.<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>summary</code></dt>
<dd>
<p>Displays summary information about the threads, classes, and memory
(default).</p>
</dd>
<dt class="hdlist1"><code>memory</code></dt>
<dd>
<p>Provides information about heap and non-heap memory consumption,
memory pools, and garbage collection statistics for a given target
instance.</p>
</dd>
<dt class="hdlist1"><code>class</code></dt>
<dd>
<p>Provides information about the class loader for a given target
instance.</p>
</dd>
<dt class="hdlist1"><code>thread</code></dt>
<dd>
<p>Provides information about threads running and the thread dump
(stack trace) for a given target instance.</p>
</dd>
<dt class="hdlist1"><code>log</code></dt>
<dd>
<p>Provides information about the loggers that are registered in the
Virtual Machine for the Java platform (Java Virtual Machine or JVM
machine).<a href="#sthref1203"><sup>Foot 1 </sup></a></p>
</dd>
</dl>
</div>
</dd>
</dl>
</div>
<div id="sthref1204" class="paragraph">
<p>Examples</p>
</div>
<div class="paragraph">
<p><a id="GSRFM617"></a><a id="sthref1205"></a></p>
</div>
<div class="paragraph">
<p>Example 1   Obtaining Summary Information for the JVM Machine</p>
</div>
<div class="paragraph">
<p>This example shows a partial listing of a report that is generated if no
type is specified. This same report is generated if the <code>summary</code> type
is specified.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; generate-jvm-report
Operating System Information:
Name of the Operating System: SunOS
Binary Architecture name of the Operating System: sparc, Version: 5.10
Number of processors available on the Operating System: 32
System load on the available processors for the last minute: 7.921875.
(Sum of running and queued runnable entities per minute)
General Java Runtime Environment Information for the VM: 64097@sr1-usca-22
...
sun.desktop = gnome
sun.io.unicode.encoding = UnicodeBig
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = ISO646-US
sun.management.compiler = HotSpot Client Compiler
sun.os.patch.level = unknown
user.dir = /home/thisuser/GlassFish/glassfishv3/glassfish/domains/mydomain4/config
user.home = /home/thisuser
user.language = en
user.name = thisuser
user.timezone = US/Pacific
Command generate-jvm-report executed successfully</code></pre>
</div>
</div>
<div class="paragraph">
<p><a id="GSRFM618"></a><a id="sthref1206"></a></p>
</div>
<div class="paragraph">
<p>Example 2   Obtaining Information for a Particular JVM Machine Type</p>
</div>
<div class="paragraph">
<p>This example generates a report that shows information on the class
loader.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; generate-jvm-report --type=class
Class loading and unloading in the Java Virtual Machine:
Number of classes currently loaded in the Java Virtual Machine: 3,781
Number of classes loaded in the Java Virtual Machine since the startup: 3,868
Number of classes unloaded from the Java Virtual Machine: 87
Just-in-time (JIT) compilation information in the Java Virtual Machine:
Java Virtual Machine compilation monitoring allowed: true
Name of the Just-in-time (JIT) compiler: HotSpot Client Compiler
Total time spent in compilation: 0 Hours 0 Minutes 4 Seconds
Command generate-jvm-report executed successfully.</code></pre>
</div>
</div>
<div id="sthref1207" class="paragraph">
<p>Exit Status</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>subcommand executed successfully</p>
</dd>
<dt class="hdlist1">1</dt>
<dd>
<p>error in executing the subcommand</p>
</dd>
</dl>
</div>
<div id="sthref1208" class="paragraph">
<p>See Also</p>
</div>
<div class="paragraph">
<p><a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a></p>
</div>
<div class="paragraph">
<p><a href="create-jvm-options.html#create-jvm-options-1"><code>create-jvm-options</code>(1)</a>,
<a href="delete-jvm-options.html#delete-jvm-options-1"><code>delete-jvm-options</code>(1)</a>,
<a href="list-jvm-options.html#list-jvm-options-1"><code>list-jvm-options</code>(1)</a></p>
</div>
<hr>
<div class="paragraph">
<p>Footnote Legend</p>
</div>
<div class="paragraph">
<p>Footnote 1: The terms "Java Virtual Machine" and "JVM" mean a Virtual
Machine for the Java platform.<br></p>
</div>
</div>
</div>

<hr />

<table width="90%" id="bottom-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>		
		<td align="left">
		<a href="freeze-transaction-service.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="get.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class="vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>

<span id="copyright">
        <img src="/resource/reference/img/eclipse_foundation_logo_tiny.png" height="20px" alt="Eclipse Foundation Logo" align="top"/>&nbsp;            
        <span >Copyright&nbsp;&copy;&nbsp;2019,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span>
</span>

</body>
</html>
